package com.guice;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class LoggerInterceptor implements MethodInterceptor{
	
	private final static Log log = LogFactory.getLog(LoggerInterceptor.class);
	
	public Object invoke(MethodInvocation invocation) throws Throwable {
		log.info("日志打印");
		Object obj=null;
		try {
			obj = invocation.proceed();
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	    return obj;
	}

}
